package com.yfp.operation.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yfp.operation.domain.DeviceCurrentComboPlan;
import com.yfp.operation.service.DeviceCurrentComboPlanService;
import com.yfp.operation.mapper.DeviceCurrentComboPlanMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import jakarta.annotation.Resource;

/**
* @author admin
* @description 针对表【device_current_combo_plan】的数据库操作Service实现
* @createDate 2024-04-25 16:03:07
*/
@Service
public class DeviceCurrentComboPlanServiceImpl extends ServiceImpl<DeviceCurrentComboPlanMapper, DeviceCurrentComboPlan> implements DeviceCurrentComboPlanService {

    @Resource
    private DeviceCurrentComboPlanMapper deviceCurrentComboPlanMapper;


    @Transactional
    @Override
    public void deleteByMachineId(String deviceId) {
        deviceCurrentComboPlanMapper.deleteByMachineId(deviceId);
    }

    @Transactional
    @Override
    public void insert(DeviceCurrentComboPlan dcp) {
        deviceCurrentComboPlanMapper.insert(dcp);
    }

    @Override
    public DeviceCurrentComboPlan selectByMachineId(String deviceId) {


        return deviceCurrentComboPlanMapper.selectByMachineId(deviceId);
    }
}




